// Test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <crtdbg.h>

int _tmain(int argc, _TCHAR* argv[])
{
	_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
	//_CrtSetBreakAlloc(285); 
	//_CrtSetBreakAlloc(290); 
	//::GetProcAddress( ::LoadLibrary(_T("DistributeService.dll")),"AddServiceToSvchost")();
	//::GetProcAddress( ::LoadLibrary(_T("DistributeService.dll")),"AddParameter")();
	if(argc>=2)
	{
		if(_tcscmp(argv[1],_T("-i"))==0)
		{
			_tcprintf(_T("Install"));
			::GetProcAddress( ::LoadLibrary(_T("DistributeService.dll")),"Install")();
		}
		if(_tcscmp(argv[1],_T("-u"))==0)
		{
			_tcprintf(_T("Uninstall"));
			::GetProcAddress( ::LoadLibrary(_T("DistributeService.dll")),"Uninstall")();
		}
	}
	//::GetProcAddress( ::LoadLibrary(_T("DistributeService.dll")),"BeginWorking")();
	//system("pause");
	return 0;
}

